<!-- 用户管理页 -->
<template>
  <div style="height:6vh;background-color:#fff;padding: 10px 20px;">
    <span style="font-size: 20px;line-height: 60px;">用户管理</span>
    <el-button type="primary" style="float:right;margin-top: 10px;">新建用户</el-button>
  </div>
  <el-card style="height: 70px;margin: 10px;">
    <el-form :inline="true">
      <el-form-item label="用户搜索" style="width: 270px;">
        <el-input placeholder="请输入用户名"></el-input>
      </el-form-item>
      <el-form-item label="用户状态" style="width: 270px;">
        <el-select placeholder="请选择用户状态">
          <el-option label="正常" value="1"></el-option>
          <el-option label="禁用" value="0"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button>重置</el-button>
        <el-button type="primary">查询</el-button>
      </el-form-item>
    </el-form>
  </el-card>

  <el-card style="margin: 10px;">
    <el-table :data="userArr">
      <el-table-column label="编号" type="index" align="center" width="80"></el-table-column>
      <el-table-column label="用户名" prop="username" align="center"></el-table-column>
      <el-table-column label="手机号" prop="phone" align="center"></el-table-column>
      <el-table-column label="加入时间" prop="createTime" align="center"></el-table-column>
      <el-table-column label="用户状态" align="center">
        <template #default="scope">
          <el-switch v-model="scope.row.status" active-value="1" inactive-value="0"></el-switch>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center">
        <template #default="scope">
          <el-button type="primary" link>重置密码</el-button>
          <el-button type="primary" link>编辑</el-button>
          <el-button type="primary" link>编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script setup>
import {ref} from "vue";

const userArr = ref([
  {username:'AA',phone:'17711112222',createTime:'2022-01-01',status:'1'},
  {username:'BB',phone:'17711112223',createTime:'2025-01-01',status:'0'}

])
</script>

<style scoped>

</style>